Memory interface circuit

ABSTRACT

A memory bus arbitrating circuit selects the request signal with the highest priority when a plurality of types of same are inputted simultaneously. A memory controlling circuit executes relative to memory control of memory bus arbitrating circuit-selected processing. A first monitoring circuit outputs a first refresh request signal when the count value of a refresh counter reaches a first prescribed value. A second monitoring circuit outputs a second refresh request signal when the count value of a refresh counter reaches a second prescribed value, which is, for example, ½ of the first prescribed value. The first, second refresh request signals are inputted to the memory bus arbitrating circuit. The memory bus arbitrating circuit regards the first refresh request signal as the request signal with the highest priority, and regards the second refresh request signal as the request signal with the lowest priority. When the second refresh request signal is inputted, memory refresh is performed only when there are no other processing requests, and when the first refresh request signal is inputted, memory refresh is performed in a compulsory manner even if there is other processing. After refresh, the count value of the refresh counter is reset. By using a second refresh request signal, it is possible to reduce the probability of the first refresh request signal being inputted to the memory bus arbitrating circuit at the same time as a request signal of other processing.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to a memory interface circuit comprising a function for refreshing memory. The present invention can be applied to a memory interface circuit, which is used, for example, in an ordinary DRAM (Dynamic Random Access Memory), and a synchronous DRAM.

[0003] 2. Description of Related Art

[0004] As is commonly known, a DRAM stores binary data in accordance with whether or not a charge is stored on a capacitor in each memory cell. For this reason, an operation, which replenishes the charge to each memory cell capacitor, is necessary to prevent a memory value from being destroyed by capacitor leakage current. This operation is called “refresh.”

[0005] In a DRAM, refresh must be performed cyclically to ensure the prevention of memory data destruction. Therefore, in an ordinary DRAM, the execution of a refresh operation takes priority over a read/write operation. That is, a DRAM will make a read/write access wait, and accept a refresh access first.

[0006] However, if read/write access is made to wait every refresh cycle, the time required for a DRAM read operation and write operation will substantially increase. For this reason, for a highspeed system, there are cases in which the performance of the entire system deteriorates because read/write operations are slow. Further, depending on the system, there are also cases in which malfunctions occur because of a slow response to a read/write request.

SUMMARY OF THE INVENTION

[0007] An object of the present invention is to provide a memory interface circuit, which is capable of executing at high speed other processes in memory, while ensuring the prevention of memory data destruction.

[0008] (1) In accordance with a first standpoint of the present invention, a memory interface circuit comprising memory bus arbitrating means, which is inputted with a plurality of types of refresh request signals, and 1 type, or a plurality of types of other processing request signals, and which selects from among the simultaneously-inputted request signals the one with the highest priority; memory controlling means for controlling memory on the basis of a request signal selected by memory bus arbitrating means; counting means for counting timing for refreshing memory; and a plurality of types of monitoring means for outputting refresh request signals with mutually differing priorities at mutually differing timing in accordance with a counting value of counting means.

[0009] (2) In accordance with a second standpoint of the present invention, a memory interface circuit comprising memory bus arbitrating means, which is inputted with a refresh request signal, and other processing request signals, and selects from among the simultaneously-inputted request signals the one with the highest priority; memory controlling means for controlling memory on the basis of a request signal selected by memory bus arbitrating means, and output a termination signal when a prescribed processing among other processing ends; counting means for counting timing for refreshing memory; monitoring means for outputting a refresh request signal in accordance with a counting value of counting means; and gate means for supplying a refresh request signal to memory bus arbitrating means when a termination signal is outputted.

[0010] (3) In accordance with a third standpoint of the present invention, a memory interface circuit comprising memory bus arbitrating means, which is inputted with a refresh request signal, and other processing request signals, and selects from among the simultaneously-inputted request signals the one with the highest priority; memory controlling means for controlling memory on the basis of a request signal selected by memory bus arbitrating means; counting means for counting timing for refreshing memory; and monitoring means for outputting a refresh request signal on the basis of a result of comparing a count value of this counting means against a comparison value stored in overwrite-capable memory.

BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Other objects and advantages of the present invention are explained below with reference to the accompanying figures.

[0012]FIG. 1 is a block diagram showing a memory interface circuit related to a first embodiment;

[0013] In FIG. 2, (A) is a logic circuit diagram showing an example of an internal constitution of the memory bus arbitrating circuit illustrated in FIG. 1, and (B) is a block diagram showing an example of an internal constitution of the memory controlling circuit illustrated in FIG. 1;

[0014]FIG. 3 is a block diagram showing a memory interface circuit related to a second embodiment;

[0015]FIG. 4 is a block diagram showing a memory interface circuit related to a third embodiment;

[0016]FIG. 5 is a block diagram showing a memory interface circuit related to a fourth embodiment;

[0017]FIG. 6 is a block diagram showing a memory interface circuit related to a fifth embodiment; and

[0018]FIG. 7 is a block diagram showing a memory interface circuit related to a sixth embodiment.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0019] Aspects of the embodiment of the present invention are explained below using the figures. Furthermore, be cognizant of the fact that the size, shape and physical relationship of each constituent element in the figures are merely approximate illustrations to enable an understanding of the present invention, and further, that the numerical conditions explained below are nothing more than examples.

[0020] First Embodiment

[0021] A first embodiment of the present invention is explained using FIG. 1 and FIG. 2.

[0022] As shown in FIG. 1, this memory interface circuit 100 comprises a memory bus arbitrating circuit 110, a memory controlling circuit 120, a counter 130, and monitoring circuits 140, 150.

[0023] As for the memory bus arbitrating circuit 110, request signals S1, S2 . . . , Sn are inputted from the outside, refresh request signal C1 is inputted from monitoring circuit 140, and refresh request signal C2 is inputted from monitoring circuit 150. When each of these request signals S1-Sn, C1, C2 is inputted, circuit 110 outputs a bus request signal Sx, which indicates that a processing request was performed, and a processing type signal Sy, which indicates the type of the request signal. When a plurality of types of request signals are inputted simultaneously, circuit 110 outputs a type signal Sy, which corresponds to the request signal with the highest priority thereamong. A read processing request signal and a write processing request signal are included as request signals S1-Sn. For this embodiment, C1 is regarded as the signal with the highest priority, and C2 is regarded as the signal with the lowest priority. The priorities of signals S1-Sn can be suitably set. For example, in descending order from the highest, the priority is regarded as C1, S1, S2, . . . , Sn, C2.

[0024]FIG. 2(A) shows one example of the internal constitution of the memory bus arbitrating circuit 120. FIG. 2 illustrates a circuit constitution when n=2, that is, when request signals C1, C2, S1, S2 are accepted.

[0025] As shown in FIG. 2(A), in this circuit 120, an OR gate 121 is inputted with signals C1, C2, S1, S2, and outputs signal Sx.

[0026] AND gate 122 is inputted with signal C1 via a NOT gate 123, and is inputted with signal S1 directly. AND gate 124 is inputted with signal C1 via a NOT gate 125, is inputted with signal S1 via a NOT gate 126, and is inputted with signal S2 directly.

[0027] OR gate 127 is inputted with the output signal of AND gate 122 and signal C1, and outputs processing type signal Sy1. OR gate 128 is inputted with the output signal of AND gate 124 and signal C1, and outputs processing type signal Sy2. That is, in the case of FIG. 2(A), the processing type signal Sy is a 2-bit signal Sy1, Sy2.

[0028] For the circuit 120 illustrated in FIG. 2, when at least one of signals C1, C2, S1, S2 is high level, signal Sx becomes high level.

[0029] Here, when signal C1 is high level, signals Sy1, Sy2 become high level, despite the level of the other signals S1, S2, C2. When signal C1 is low level, and signal S1 is high level, signal Sy1 is high level, and signal Sy2 is low level, despite the levels of the other signals S2, C2. When signals C1, S1 are low level, and signal S2 is high level, signal Sy1 is low level, and signal Sy2 is high level, despite the level of signal C2. And when signals C2, S1, S2 are low level, and signal C2 is high level, signals Sy1, Sy2 become low level.

[0030] That is, for this circuit 120, the request signal priority becomes C1, S1, S2, C2.

[0031] The memory controlling circuit 120 in FIG. 1 controls a DRAM based on signals Sx, Sy, and executes read/write processing, and refresh processing.

[0032]FIG. 2(B) illustrates one example of an internal constitution of the memory controlling circuit 120.

[0033] As shown in FIG. 2(B), the memory controlling circuit 120 comprises a sequence controlling circuit 121, and a control signal generating circuit 122.

[0034] Controlling circuit 121 is inputted with a processing type signal Sy, determines the type of processing (read/write processing and refresh processing), and executes the sequence control for that process.

[0035] Further, the signal generating circuit 122 generates a control signal based on controlling circuit 121 control. As the control signals thereof, signals for controlling a DRAM 200, and a signal for controlling a counter 130 are generated. The signals for controlling DRAM 200 comprise, for example, an address signal A, a data input-output signal DQ, a row address strobe signal /RAS, a column address strobe signal /CAS, a write enable signal /WEN, an output enable signal /OEN, and the like. As a signal for controlling the counter 130, for example, a reset signal R is generated.

[0036] In this embodiment, since there are two types of refresh request signals, there are also two types of processing type signals Sy corresponding to refresh processing. That is, type signal Sy corresponding to request signal C1 is (Sy1, Sy2)=(1, 1), and type signal Sy corresponding to request signal C2 is (Sy1, Sy2)=(0, 0). Memory controlling circuit 120 performs the same refresh processing for both type signals Sy.

[0037] As the refresh counter 130 in FIG. 1, an up counter or a down counter can be used. This embodiment is explained using as an example a case in which an up counter is used as the refresh counter 130.

[0038] Monitoring circuit 140 outputs request signal C1, when the count value of counter 130 is added to a predetermined comparison value X1. Further, monitoring circuit 150 outputs request signal C2, when the count value of counter 130 is added to a predetermined comparison value X2. The value of X1 is set in accordance with the refresh cycle limit required for maintaining the data stored in DRAM 200. The value of X2 should be a smaller value than that of X1, for example, it can be made to equal {fraction (1/2)} of X1. For example, if it is assumed that the bit number of counter 130 is n, by constituting monitoring circuit 140 so that it outputs signal C1 when all such n bits are ‘1’, and by constituting monitoring circuit 150 so that it outputs signal C2 when all lower n-1 bits are ‘1’, it is possible to make X2 equal to {fraction (1/2)} of X1.

[0039] The operation of memory interface circuit 100 is explained below.

[0040] When power is supplied to interface circuit 100, the counter 130 begins to count up. Then, when the count value of counter 130 reaches X2, monitoring circuit 150 outputs refresh request signal C2. And when the count value of counter 130 reaches X1, monitoring circuit 140 outputs refresh request signal C1.

[0041] As for the memory bus arbitrating circuit 110, when it is inputted with request signals S1-Sn, C1, C2 as described above, it generates signals Sx, Sy in correspondence with the highest priority request signal thereamong. That is, when a plurality of types of request signals are inputted simultaneously to arbitrating circuit 110, the request with the highest priority is executed by memory controlling circuit 120. As mentioned above, of all the request signals, the priority of signal C2 is the lowest, and the priority of signal C1 is the highest. Therefore, when 1 or a plurality of request signals S1-Sn, and signal C2 are inputted simultaneously to arbitrating circuit 110, DRAM 200 is not refreshed. Conversely, when signal C1 is inputted to arbitrating circuit 110, DRAM 200 is refreshed even when other request signals are inputted at the same time.

[0042] When memory controlling circuit 120 is inputted with signals Sx, Sy, it controls the operation of DRAM 200 by generating and outputting control signals in accordance with a predetermined sequence. Further, when the process indicated by signals Sx, Sy is refresh, it performs the same refresh processing, whether it is based on signal C1 or whether it is based on signal C2, and once processing is complete, it outputs a reset signal R. The counter 130 resets the count value when signal R is inputted.

[0043] In this manner, when the count value of counter 130 reaches X1 in the interface circuit 100 related to this embodiment, because refresh is carried out in a compulsory manner even if there are other processing requests, there is no possibility of DRAM 200 memory data being lost. In contrast thereto, when the count value of counter 130 reaches X2, refresh is performed only when other processing requests are not being carried out. That is, with interface circuit 100, when there are no other processing requests, refresh is performed even if refresh time has not been reached. In accordance therewith, it is possible to reduce the probability of compulsory refresh processing and other processing being requested simultaneously.

[0044] Second Embodiment

[0045] A second embodiment of the present invention is explained using FIG. 3.

[0046] In FIG. 3, constituent components having the same reference numerals as in FIG. 1 are of the same constitution, respectively, as those of FIG. 1.

[0047] A memory bus arbitrating circuit 310 is inputted with request signals S1-Sn from outside, and is inputted with refresh request signal C1 from monitoring circuit 140, with refresh request signal C2 from monitoring circuit 150, with refresh request signal C3 from monitoring circuit 330, and with refresh request signal C4 from monitoring circuit 340.

[0048] When these signals S1-Sn, C1-C4 are inputted, circuit 310 outputs a type signal Sy corresponding to the request signal with the highest priority, together with a bus request signal Sx. For this embodiment, C1 is regarded as the signal with the highest priority, and C4 is regarded as the signal with the lowest priority. The priorities of signals S1-Sn, C2, C3 can be suitably set on the conditions that the priority of C2 be higher than that of C3, and that the priorities of C2 and C3 not be consecutive. For example, in descending order from the highest, the priority is regarded as C1, S1, S2, . . . , Sn-2, C2, Sn-1, C3, Sn, C4. In this embodiment, signals S1-Sn-2, for example, correspond to processing in which the requirement for highspeed execution is high, signal Sn-1 corresponds to processing in which the requirement for highspeed execution is rather low, and signal Sn corresponds to processing in which the requirement for highspeed execution is extremely low.

[0049] A memory controlling circuit 320 controls DRAM 200 on the basis of signals Sx, Sy, and executes read/write processing and refresh processing. In this embodiment, since there are four types of refresh request signals, there are also four types of processing type signals Sy corresponding to refresh processing. The memory controlling circuit 320 performs the same refresh processing for all type signals Sy.

[0050] Monitoring circuit 330 outputs request signal C3 when the count value of counter 130 is added to a predetermined comparison value X3. And monitoring circuit 340 outputs request signal C4 when the count value of counter 130 is added to a predetermined comparison value X4. The value of X3 should be a smaller value than that of comparison value X2 of monitoring circuit 150, and the value of X4 should be a smaller value than X3. That is, X1-X4 are determined so that refresh request signals C1-C4 are outputted at a faster timing the lower the priority. For example, if it is assumed that the bit number of counter 130 is n, monitoring circuit 140 can be constituted so that it outputs signal C1 when all such n bits are ‘1’, monitoring circuit 150 can be constituted so that it outputs signal C2 when all lower n-1 bits are ‘1’, monitoring circuit 330 can be constituted so that it outputs signal C3 when all lower n-2 bits are ‘1’, and monitoring circuit 340 can be constituted so that it outputs signal C4 when all lower n-3 bits are ‘1’. In this case, X2 is {fraction (1/2)} of X1, X3 is {fraction (1/2)} of X2, and X4 is {fraction (1/2)} of X3.

[0051] The operation of memory interface circuit 300 is explained below.

[0052] When power is supplied to interface circuit 300 counter 130 begins to count up. Then, when the count value of counter 130 reaches X4, monitoring circuit 340 outputs refresh request signal C4.

[0053] As described above, the priority of signal C4 is the lowest of the request signals. Therefore, when signal C4 alone is inputted to arbitrating circuit 310, controlling circuit 320 executes refresh processing, and when signal C4 is inputted to arbitrating circuit 310 at the same time as another request signal (any of signals S1-Sn), controlling circuit 320 executes the other processing. When refresh processing has been performed, the count value of counter 130 is reset by the controlling circuit 320.

[0054] When refresh is not carried out based on signal C4, counter 130 continues to count. Then, when the count value of counter 130 reaches X3, monitoring circuit 330 outputs refresh request signal C3.

[0055] The priority of signal C3 is higher than that of request signal Sn, but lower than those of request signals S1-Sn-1. Therefore, even if signal C3 is inputted to arbitrating circuit 310 at the same time as signal Sn, controlling circuit 320 executes refresh processing on a priority basis. Conversely, when signal C3 is inputted to arbitrating circuit 310 at the same time as signals S1-Sn-1, memory controlling circuit 320 does not execute refresh. When refresh processing has been performed, the count value of counter 130 is reset by the controlling circuit 320.

[0056] When refresh is not carried out based on signal C3, counter 130 continues to count. Then, when the count value of counter 130 reaches X2, monitoring circuit 150 outputs refresh request signal C2.

[0057] The priority of signal C2 is higher than those of request signals Sn, Sn-1, but lower than those of request signals S1-Sn-2. Therefore, even if signal C2 is inputted to arbitrating circuit 310 at the same time as signals Sn, Sn-1, controlling circuit 320 executes refresh processing on a priority basis. Conversely, when signal C2 is inputted to arbitrating circuit 310 at the same time as signals S1-Sn-2, memory controlling circuit 320 does not execute refresh. When refresh processing has been performed, the count value of counter 130 is reset by the controlling circuit 320.

[0058] When refresh is not carried out based on signal C2, counter 130 continues to count. Then, when the count value of counter 130 reaches X1, monitoring circuit 140 outputs refresh request signal C1.

[0059] The priority of signal C1 is higher than those of request signals S1-Sn. Therefore, when signal C1 is inputted to arbitrating circuit 310, controlling circuit 320 executes refresh processing on a priority basis even if request signals S1-Sn of other processing are inputted simultaneously thereto. Following refresh, the controlling circuit 320 resets the count value of counter 130.

[0060] In this manner, when the count value of counter 130 reaches X4 in the interface circuit 300 related to this embodiment, refresh is performed only when other processing requests are not being carried out. Further, when the count value of counter 130 reaches X3, refresh is executed on a priority basis only when processing correspondent to signal Sn, that is, processing for which the requirement for highspeed execution is extremely low, is requested. Furthermore, when the count value of counter 130 reaches X2, refresh is executed on a priority basis only when processing correspondent to signals Sn-1, Sn, that is, processing for which the requirement for highspeed execution is rather low, is requested. In accordance therewith, it is possible to reduce, in accordance with the degree of necessity of highspeed execution requested by other processing, the probability that other processing is not executed for the sake of refresh processing. Contrary thereto, when the counter 130 count value reaches X1, because refresh is performed in a compulsory manner even if there is a request for other processing, there is no possibility that DRAM 200 memory data will be lost.

[0061] Third Embodiment

[0062] A memory interface circuit related to a third embodiment of the present invention is explained using FIG. 4.

[0063] In FIG. 4, constituent components having the same reference numerals as in FIG. 1 are of the same constitution, respectively, as those of FIG. 1.

[0064] In interface circuit 400, a memory bus arbitrating circuit 410 is inputted with request signals S1, S2 . . . , Sn from outside, and refresh request signal C5 is inputted from an AND gate 440. Circuit 410 generates and outputs a bus request signal Sx and a processing type signal Sy corresponding to the highest priority request signal of the simultaneously-inputted request signals S1-Sn, C5. For this embodiment, signal C5 is regarded as the request signal with the highest priority. Further, signal S1 is assigned to the process which has the highest priority and highest execution frequency in all process other than refresh. For example, in descending order from the highest, the priority is regarded as C5, S, S2, . . . , Sn.

[0065] A memory controlling circuit 420 control DRAM 200 on the basis of signals Sx, Sy, and executes read/write processing, and refresh processing. Further, controlling circuit 420 outputs a reset signal R when refresh processing based on signal C5 has ended, and outputs a termination signal Se when processing based on signal S1 has ended.

[0066] Monitoring circuit 430 outputs signal Sc when the count value of counter 130 reaches a predetermined comparison value X5. The value of X5 is set at a value equivalent to a time shorter than the limit of refresh time required for maintaining data stored in DRAM 200. For example, if it is assumed that the counter 130 bit number is n, by constituting monitoring circuit 140 so that signal Sc is outputted when all n-1 bits are ‘1,’ X5 is set to {fraction (1/2)} of the limit.

[0067] When AND gate 440 is inputted with signal Se and signal Sc, it outputs signal C5.

[0068] The operation of memory interface circuit 400 is explained below.

[0069] When power is supplied to interface circuit 400, counter 130 begins to count up. Then, when the count value of counter 130 reaches X5, monitoring circuit 430 outputs signal Sc. Signal Sc is maintained by a flip-flop (not shown in the figure) or the like inside monitoring circuit 430.

[0070] Conversely, controlling circuit 420 controls DRAM 200 on the basis of signals Sx, Sy. Then, when control of processing is executed on the basis of request signal S1, controlling circuit 420 outputs signal Se after processing ends.

[0071] As mentioned above, AND gate 440 outputs signal C5 when signals Se, Sc are both ON. Since signal C5 is the highest priority request signal, when arbitrating circuit 410 is inputted with signal C5, it causes controlling circuit 420 to refresh DRAM 200. When refresh ends, controlling circuit 420 outputs a reset signal R. The count value of counter 130 is reset by this signal R.

[0072] In accordance with the interface circuit 400 related to this embodiment, DRAM 200 refresh is performed immediately after the count value of counter 130 reaches X5, and processing that corresponds to signal S1 ends.

[0073] That is, in accordance with this embodiment, processing with the highest priority of processing other than refresh, and for which execution frequency is high, can be executed at high speed, and the execution of refresh can be ensured.

[0074] Fourth Embodiment

[0075] A memory interface circuit related to a fourth embodiment of the present invention is explained using FIG. 5.

[0076] In FIG. 5, constituent components having the same reference numerals as in FIG. 1 are of the same constitution, respectively, as those of FIG. 1.

[0077] In interface circuit 500, a memory bus arbitrating circuit 510 is inputted with request signals S1, S2 . . . , Sn from outside, and refresh request signal C6 is inputted from a monitoring circuit 530. Circuit 510 generates and outputs a bus request signal Sx and a processing type signal Sy corresponding to the highest priority request signal of the simultaneously-inputted request signals S1-Sn, C6. For this embodiment, signal C6 is regarded as the request signal with the highest priority. Further, signal S1 is assigned to the process, which has the highest priority and highest execution frequency in all process other than refresh. For example, in descending order from the highest, the priority is regarded as C6, S1, S2, Sn.

[0078] A memory controlling circuit 520 controls DRAM 200 on the basis of signals Sx, Sy, and executes read/write processing, and refresh processing. Further, controlling circuit 520 outputs a reset signal R when refresh processing has ended.

[0079] Monitoring circuit 530 comprises a register 531 as overwrite-capable memory, and a comparator 532. A predetermined comparison value X6 is stored in register 531. This value X6 is inputted from outside the interface circuit 500. It is desirable for the value of X6 to be set so that refresh timing does not overlap with the execution timing of signal S1-based processing. Further, the comparator 532 compares the count value inputted from counter 130 and the memory value inputted from register 531, and when the count value is larger, outputs request signal C6.

[0080] The operation of memory interface circuit 500 is explained below.

[0081] When power is supplied to interface circuit 500, counter 130 begins to count up, and sequentially outputs count values. Comparator 532, as described above, sequentially compares this count value with a comparison value X6 stored in register 531, and when the count value is larger, outputs request signal C6. Since signal C6 is the highest priority request signal, when signal C6 is inputted, the arbitrating circuit 510 causes the controlling circuit 520 to refresh DRAM 200. When refresh ends, the controlling circuit 520 outputs a reset signal R. The count value of counter 130 is reset by this signal R.

[0082] In the interface circuit 500 related to this embodiment, an overwrite-capable memory, that is, register 531 is provided, making it possible for X6 to be changed at will. Therefore, interface circuit 500 facilitates the performing of refresh by selecting a timing when signal S1-based processing is not executed, or a timing when the probability of execution is low.

[0083] That is, in accordance with this embodiment, it becomes easy to avoid the simultaneous carrying out of a predetermined processing request and a refresh processing request, and in accordance therewith, highspeed execution of predetermined processing, and the assured execution of refresh are realized.

[0084] Fifth Embodiment

[0085] A memory interface circuit related to a fifth embodiment is explained using FIG. 6.

[0086] As shown in FIG. 6, this memory interface circuit 600 comprises a memory bus arbitrating circuit 610, a memory controlling circuit 620, a counter 630, and a monitoring circuit 640.

[0087] The memory bus arbitrating circuit 610 is inputted with request signals S11, S2 . . . , Sn from outside, and refresh request signal C7 is inputted from a monitoring circuit 640. Circuit 610 generates and outputs a bus request signal Sx and a processing type signal Sy corresponding to the highest priority request signal of the simultaneously-inputted request signals S1-Sn, C7. For this embodiment, signal C7 is regarded as the request signal with the highest priority. For example, in descending order from the highest, the priority is regarded as C7, S1, S2, . . . , Sn.

[0088] A memory controlling circuit 620 controls DRAM 200 on the basis of signals Sx, Sy, and executes read/write processing, and refresh processing, making it the same as the memory controlling circuits in each of the above-described aspects of the embodiment. However, controlling circuit 620 differs from each of the above-described aspects of the embodiment in that it does not output a reset signal R when refresh processing has ended.

[0089] As a counter 630, an ordinary up counter or down counter can be used, and for this embodiment, the explanation makes use of an example in which an up counter is used. The counter 630 operating cycle, that is, the duration from a state in which all bits are ‘0’ until it reaches a state in which all bits are ‘1,’ is set in accordance with the refresh cycle required for maintaining data stored in DRAM 200.

[0090] Monitoring circuit 640 comprises registers 641, 642 as overwrite-capable memory, comparators 643, 644, and an AND gate 645. A predetermined comparison value X7 is stored in register 641, and a predetermined comparison value X8 is stored in register 642. These values X7, X8 are inputted to the interface circuit 600 from outside. Comparison values X7, X8 are set so that X7<X8. Further, it is desirable for comparison values X7, X8 to be set so that refresh timing does not overlap with the execution timing of other processing. Comparator 643 compares the count value CNT inputted from counter 630 and the memory value X7 inputted from register 641, and when CNT≦X7, it makes the output signal low level, and when CNT>X7, it makes the output signal high level. Comparator 644 compares the count value CNT inputted from counter 630 and the memory value X8 inputted from register 642, and when CNT<X8, it makes the output signal high level, and when CNT>X8, it makes the output signal low level. AND gate 645 outputs refresh request signal C7 when comparators 643, 644 are both high level.

[0091] The operation of memory interface circuit 600 is explained below.

[0092] When power is supplied to interface circuit 600, counter 630 begins to count up, sequentially outputting count values CNT. Comparators 643, 644, as described above, sequentially compare this count value against comparison values X7, X8 stored in registers 641, 642.

[0093] Here, when CNT≦X7, because the output of comparator 643 becomes low level, and the output of comparator 644 becomes high level, output C7 of AND gate 645 becomes low level. Therefore, DRAM 200 refresh is not executed.

[0094] When X7<CNT≦X8, because the outputs of comparators 643, 644 are both high level, output C7 of AND gate 645 becomes high level. Therefore, DRAM 200 refresh is carried out in the same manner as in each above-described embodiment.

[0095] Further, when X8<CNT, because the output of comparator 643 becomes high level, and the output of comparator 644 becomes low level, the output C7 of AND gate 645 becomes low level. Therefore, DRAM 200 refresh is not executed.

[0096] Thereafter, when the counter 630 count value returns to ‘0,’ the output of comparator 643 returns to low level, and the output of comparator 644 returns to high level.

[0097] By repeating the above operations, DRAM 200 refresh is executed cyclically by interface circuit 600.

[0098] As described above, in this embodiment, an overwrite-capable memory, that is, registers 641, 642 are provided, making it possible to change X7, X8 at will. Therefore, interface circuit 600 enables refresh to be performed by selecting a timing when other processing is not executed. When processing other than refresh is cyclically-executed processing, the interface circuit 600 related to this embodiment is especially effective.

[0099] As described above, in accordance with this embodiment, it becomes possible to avoid the simultaneous carrying out of a predetermined processing request and a refresh processing request, and in accordance therewith, highspeed execution of predetermined processing, and the assured execution of refresh are realized.

[0100] Furthermore, for this embodiment, comparator 643 was constituted so that an output signal is made high level when CNT>X7, and comparator 644 was constituted so that an output signal is made low level when CNT>X8, but comparator 643 can be constituted so that an output signal is made low level when CNT>X7, and comparator 644 can be constituted so that an output signal is made high level when CNT>X8. In this case, an OR gate is utilized in place of the AND gate 645.

[0101] Sixth Embodiment

[0102] A memory interface circuit related to a sixth embodiment is explained using FIG. 7.

[0103] In FIG. 7, constituent components having the same reference numerals as in FIG. 1 are of the same constitution, respectively, as those of FIG. 1.

[0104] In FIG. 7, a memory bus arbitrating circuit 710 is inputted with request signals S1, S2 . . . , Sn from outside, and refresh request signal C8 is inputted from a monitoring circuit 740. Circuit 710 generates and outputs a bus request signal Sx and a processing type signal Sy corresponding to the highest priority request signal of the simultaneously-inputted request signals S1-Sn, C8. For this embodiment, signal C8 is regarded as the request signal with the highest priority. For example, in descending order from the highest, the priority is regarded as C8, S1, S2, . . . , Sn.

[0105] A memory controlling circuit 720 control DRAM 200 on the basis of signals Sx, Sy, and executes read/write processing, and refresh processing. For this embodiment, controlling circuit 720 checks the start timing and end timing of prescribed processing other than refresh, outputs signal Ss at start timing, and outputs signal Se at end timing. Prescribed processing can be 1 type, or a plurality of types. Further, controlling circuit 720 outputs a reset signal R when refresh has ended.

[0106] Monitoring circuit 740 comprises registers 741, 742 as overwrite-capable memory, comparators 743, 744, and an OR gate 745. Register 741 stores a count value CNT of counter 130 at signal Se timing. Register 742 stores a count value CNT of counter 130 at signal Se timing. Comparator 743 compares a count value CNT of counter 130 against a stored value X9 of register 741, outputs high level when CNT<X9, and outputs low level when CNT≧X9. Comparator 744 compares a count value CNT of counter 130 against a stored value X10 of register 742, outputs low level when CNT≦X10, and outputs high level when CNT>X10. OR gate 745 outputs refresh request signal C8 when one of comparators 743, 744 is high level.

[0107] The operation of memory interface circuit 700 is explained below.

[0108] At initialization, registers 741, 742 are each set to a suitable value.

[0109] When power is supplied to interface circuit 700, counter 130 begins to count up, sequentially outputting count values CNT.

[0110] At this point, a request signal of the above-mentioned ‘prescribed processing’ is inputted to arbitrating circuit 710, and when this request is transferred to a controlling circuit 720, the controlling circuit 720 commences processing relative to memory 200, outputting signal Ss. When signal Ss is inputted, register 741 stores a count value CNT of the counter 130.

[0111] The controlling circuit 720 outputs signal Se when ‘prescribed processing’ ends. When signal Se is inputted, register 742 stores a count value CNT of the counter 130.

[0112] Comparators 743, 744, as described above, sequentially compare this count value CNT against the comparison values X9, X10 stored in registers 741, 742. As mentioned above, comparator 743 outputs low level when CNT≧X9, and comparator 744 outputs low level when CNT≦X10. Therefore, during the timimg X9≦CNT≦X10, the OR gate 745 is always low level, and refresh request signal C8 is not outputted. In accordance therewith, memory interface circuit 700 learned the timing when it should not issue a refresh processing request signal. Then, in the next and subsequent cycle operations, the memory interface circuit 700 operates on the basis of this learned information. That is, in the next and subsequent cycle operations, the memory interface circuit 700 does not output refresh request signal C8 during the timing X9≦CNT≦X10.

[0113] When a refresh request is issued during the timing CNT<X9, or X10<CNT, the arbitrating circuit 710 causes the controlling circuit 720 to execute DRAM 200 refresh. The controlling circuit 720 outputs reset signal R after refresh ends.

[0114] In accordance with this embodiment, a refresh request can be carried out at a timing when there is a high likelihood that the above-mentioned ‘prescribed processing’ is not being executed. Consequently, DRAM 200 can be refreshed without canceling a ‘prescribed processing.’ Even when the timing at which a ‘prescribed processing’ is executed changes for some reason, since the stored contents of registers 741, 742 can be overwritten, the likelihood is small that ‘prescribed processing’ and refresh will be requested at the same time.

[0115] In this manner, in this embodiment, the probability that a predetermined processing request and a refresh processing request will be carried out simultaneously can be reduced, and in accordance therewith, the highspeed execution of a predetermined processing and the assured execution of refresh are realized.

[0116] As described above, in accordance with a memory interface circuit related to the present invention, other processing can be executed in memory at high speed, while ensuring the prevention of memory data destruction. 

What is claimed is:
 1. A memory interface circuit characterized in that it comprises: memory bus arbitrating means, which is inputted with a plurality of types of refresh request signals, and one type, or a plurality of types of other processing request signals, and which selects from among said simultaneously-inputted request signals a same with the highest priority; memory controlling means for controlling said memory on the basis of said request signal selected by said memory bus arbitrating means; counting means for counting the timing for refreshing memory; and plurality of types of monitoring means for outputting said refresh signals having mutually different priorities at mutually different timing in accordance with a count value of said counting means.
 2. The memory interface circuit according to claim 1, characterized in that said memory controlling means resets a count value of said counting means when said memory is refreshed on the basis of any of said refresh request signals.
 3. The memory interface circuit according to claim 1, characterized in that it comprises: two said monitoring means, and a first monitoring means outputs said refresh request signal having the highest priority of all said request signals, and a second monitoring means outputs said refresh request signal having the lowest priority of all said request signals.
 4. The memory interface circuit according to claim 3, characterized in that the timing at which said second monitoring means outputs said refresh request signal is faster than the timing at which said first monitoring means outputs said refresh request signal.
 5. The memory interface circuit according to claim 1, characterized in that it comprises: plurality of said monitoring means, and priorities of all request signals are determined so that priorities of said refresh signals outputted by respective said monitoring means are not consecutive.
 6. The memory interface circuit according to claim 5, characterized in that the timing at which respective said monitoring means output said refresh signals is as fast as a same with the lowest priority.
 7. The memory interface circuit according to claim 1, characterized in that said counting means is an up counter or a down counter.
 8. The memory interface circuit according to claim 1, characterized in that said memory is a dynamic random access memory.
 9. A memory interface circuit characterized in that it comprises: memory bus arbitrating means, which is inputted with a refresh request signal, and other processing request signals, and which selects from among said simultaneously-inputted request signals a same with the highest priority; memory controlling means for controlling said memory on the basis of said request signal selected by said memory bus arbitrating means, and for outputting a terminating signal when a prescribed processing among said other processing ends; counting means for counting the timing for refreshing memory; monitoring means for outputting a refresh request signal in accordance with a count value of said counting means; and gating means for supplying said refresh request signal to said memory bus arbitrating means when said terminating signal is outputted.
 10. The memory interface circuit according to claim 9, characterized in that said memory controlling means resets a count value of said counting means when said memory is refreshed on the basis of any of said refresh request signals.
 11. The memory interface circuit according to claim 9, characterized in that said counting means is an up counter or a down counter.
 12. The memory interface circuit according to claim 9, characterized in that said memory is a dynamic random access memory.
 13. A memory interface circuit characterized in that it comprises: memory bus arbitrating means, which is inputted with a refresh request signal, and other processing request signals, and which selects from among said simultaneously-inputted request signals a same with the highest priority; memory controlling means for controlling said memory on the basis of said request signal selected by said memory bus arbitrating means; counting means for counting the timing for refreshing memory; and monitoring means for outputting said refresh request signal based on the result of comparing a count value of said counting means against a comparison value stored in overwrite-capable memory.
 14. The memory interface circuit according to claim 13, characterized in that said monitoring means comprises: one said overwrite-capable memory; and comparing means for outputting said refresh request signal when a count value of said counting means either matches or exceeds a value stored in said memory.
 15. The memory interface circuit according to claim 14, characterized in that said memory controlling means resets a count value of said counting means when said memory is refreshed on the basis of any of said refresh request signals.
 16. The memory interface circuit according to claim 13, characterized in that said monitoring means comprises: a first overwrite-capable memory for storing a first comparison value inputted from outside; a second overwrite-capable memory for storing a second comparison value inputted from outside; first comparing means for outputting a first signal when a count value of said counting means either matches or exceeds said first comparison value; second comparing means for outputting a second signal when a count value of said counting means either matches or exceeds said second comparison value; and gating means for outputting said refresh request signal between the outputting of said first signal and the outputting of said second signal.
 17. The memory interface circuit according to claim 13, characterized in that said monitoring means comprises: a third overwrite-capable memory for storing said count value as a third comparison value when said memory controlling means starts a prescribed processing of said other processing; a fourth overwrite-capable memory for storing said count value as a fourth comparison value when said memory controlling means terminates said prescribed processing; third comparing means for outputting a third signal when a count value of said counting means either matches or exceeds said third comparison value; fourth comparing means for outputting a fourth signal when a count value of said counting means either matches or exceeds said fourth comparison value; and gating means for prohibiting the output of said refresh request signal between the outputting of said third signal and the outputting of said fourth signal.
 18. The memory interface circuit according to claim 13, characterized in that said counting means is an up counter or a down counter.
 19. The memory interface circuit according to claim 13, characterized in that said memory is a dynamic random access memory. 